# 列表的遍历
from os import remove

list1 = [1, 2, 3, 4, 5, 6, 7, 8]
for i in list1:
    print(i)

#  将下标和 值打印出来
for index, value in enumerate(list1):
    print("循环后下标为 %d  值为%d" % (index,value))

print("--"*20)

for i in range(len(list1)):
    print("循环后下标为 %d  值为%d" % (i,list1[i]))